package com.lx.springcloud.demo1.book.beans;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Book {

    //${} 使用placeHolder 从properties 文件中取值
    // #{} 使用 SpEL 表达式
    @Value("${book.name}")
    private String name;

    @Value("${book.author}")
    private String author;

    @Value("${com.lx.blog.value}")
    private String blog;

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", author='" + author + '\'' +
                ", blog='" + blog + '\'' +
                '}';
    }
}
